package com.netty.rpc.consumer;

import com.netty.rpc.api.IRpcHelloService;
import com.netty.rpc.api.IRpcService;
import com.netty.rpc.consumer.proxy.RpcProxy;

/**
 * @author vince
 * @date 2021/8/10 21:16
 * @Version 1.0
 */
public class RpcConsumer {
    public static void main(String[] args) {
        IRpcHelloService rpcHello = RpcProxy.create(IRpcHelloService.class);

        System.out.println(rpcHello.hello("world"));

        IRpcService service = RpcProxy.create(IRpcService.class);

        System.out.println("1+1 = " + service.add(1, 1));
        System.out.println("1-1 = " + service.sub(1, 1));
        System.out.println("1*1 = " + service.mult(1, 1));
        System.out.println("1/1 = " + service.div(1, 1));
    }
}
